package com.vint.mi;

/**
 * Copyright (C) 2017, Xiaomi Inc. All rights reserved.
 * Created by vint @ 2017/10/24.
 * in leetcode
 */
public class Mi10 {
    public static String solution(String line){
        int n = Integer.parseInt(line);
        return solution(n) + "";
    }
    public static int solution(int n){
        if(n==1)
            return 1;
        if(n==2)
            return 2;
        if(n<1)
            return 0;
        return solution(n-1) + solution(n-2);
    }
    public static void main(String[] args) {
        String ex1 = "5";
        String ex2 = "10";
        System.out.println(solution(ex1));
        System.out.println(solution(ex2));

    }
}
